package com.example.goatstore;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class PrincipalAdminActivity extends Activity {
	private long idUser;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.principal_admin);
        Bundle datos = getIntent().getExtras();
        idUser = datos.getLong("iduser");
        
        ((Button) findViewById(R.id.button2)).setOnClickListener(new OnClickListener() {
        	//cambiar contraseña
			public void onClick(View v) {				
					Intent intent = new Intent(PrincipalAdminActivity.this, ActualizarPassActivity.class);   	    	            	
			       	Bundle b = new Bundle(); 
				    b.putLong("idusuario",idUser);
				    b.putInt("desde",1);
				    intent.putExtras(b);
					startActivity(intent);		
        	}
		});
        
        ((Button) findViewById(R.id.button1)).setOnClickListener(new OnClickListener() {    	
			public void onClick(View v) {				
					Intent intent = new Intent(PrincipalAdminActivity.this, ListaEmpresaActivity.class);   	    	            	
			       	Bundle b = new Bundle(); 
				    b.putLong("idusuario",idUser);
				    b.putInt("desde",1); //1- admin
				    intent.putExtras(b);
					startActivity(intent);		
        	}
		});
        
        ((Button) findViewById(R.id.button3)).setOnClickListener(new OnClickListener() {    	
			public void onClick(View v) {				
					Intent intent = new Intent(PrincipalAdminActivity.this, LoginActivity.class);   	    	            	
					startActivity(intent);		
        	}
		});
    }
}
